[Android] ProgressBar inside SimpleAdapter

Posted by lemon on Stack Overflow See other posts from Stack Overflow or by lemon
Published on 2010-06-09T04:48:48Z Indexed on 2010/06/09 4:52 UTC
Read the original article Hit count: 355

Filed under:
|

I'm trying to add a ProgressBar to my row.xml view but I can't seem to make it work I keep getting

06-09 12:44:44.802: ERROR/AndroidRuntime(1012): java.lang.IllegalStateException: android.widget.ProgressBar is not a  view that can be bounds by this SimpleAdapter

ArrayList arr = new ArrayList();
HashMap map = new HashMap();
map.put("progress", 10);
arr.add(map);

String [] fieldNames = {"progress"};
int [] fieldIds = {R.id.progress};

SimpleAdapter adapter = new SimpleAdapter(this, arr, R.layout.row, fieldNames, fieldIds);
list = (ListView) findViewById(R.id.list);
list.setAdapter(adapter);

<ProgressBar android:id="@+id/progress"
        style="?android:attr/progressBarStyleHorizontal"
        android:max="100"
        android:progress="5"        
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" 
    />

Does anyone have any idea what I'm missing?

© Stack Overflow or respective owner

Related posts about java

Related posts about android